package com.shijie99.paper.manage.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.shijie99.paper.manage.pojo.PmPolicyInfo;
import com.shijie99.paper.manage.pojo.PmPolicyLimit;
import com.shijie99.paper.manage.pojo.PmPolicyLimitDate;
import com.shijie99.paper.manage.pojo.PmPolicyRefund;
import com.shijie99.paper.manage.service.PaperOrderService;

/**
 * 
 * @ClassName:     PaperOrderConltroller.java
 * @Description:   纸单产品新增 
 * 
 * @author         yk
 * @version        V1.0  
 * @Date           2016-4-18 上午10:05:42
 */

@Controller
@RequestMapping(value = "/paperOrder")
public class PaperOrderConltroller {
	
	@Autowired
	private PaperOrderService paperOrderService;
	
	
	@RequestMapping(value="addpaper")
	public ModelAndView AddPaper(){
		return new ModelAndView("paper/addpaper");
	}
	
	
	@RequestMapping("addPaperOrder")
	public ModelAndView addPaperOrder(PmPolicyInfo pmPolicyInfo,PmPolicyLimit pmPolicyLimit,
			PmPolicyLimitDate pmPolicyLimitDate,PmPolicyRefund pmPolicyRefund){
		
		
		System.out.println(pmPolicyInfo);
		System.out.println(pmPolicyLimit);
		System.out.println(pmPolicyLimitDate);
		System.out.println(pmPolicyRefund);
		
		paperOrderService.addPaperOrder(pmPolicyInfo, pmPolicyLimit, pmPolicyLimitDate, pmPolicyRefund);
		return new ModelAndView("paper/addpaper");
	}

}
